<template>
	<view class="bgcolor">
		<header-top :messageInfo="{typeFlag:true,message:'历史反馈'}">
		</header-top>
		<view class="mainpdding2">
			<view class="ffffff mainpadding_top radius"  v-for="item in list.data" :key="item.id">
				<view class="flexbetween topmsg">
					<view class="strongtext">{{item.createtime_text}}</view>
					<view class="strongtext" style="color: #ff0000;" v-show="item.status==1">待处理</view>
					<view class="strongtext" style="color: #3476fe;"  v-show="item.status==2">已处理</view>
				</view>
				<view class="nostrongtext margin_top">{{item.des}}</view>
				<view class="allimage flexleft">
					<view class="flexcenter itemlable" style="flex-wrap: wrap;" v-if="item.images_text.length" v-for="ite in item.images_text" :key="ite">
						<view class="itemimage">
							<image :src="ite" mode=""></image>
						</view>
					</view>
				</view>
				<view class="nostrongtext margin_top" v-show="item.status==2">{{item.cltime_text}}回复：{{item.remarks}}</view>
			</view>
		</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				page: 1,
				limit: 12,
				list: {
					data: []
				},
			}
		},
		onLoad() {
			this.init()
		},
		methods: {
			// 热门推荐列表
			init(isPage, page) {
				let _this = this;
				httpRequest.request('/employeesapi/user/getFeedbackList', 'POST', {
					page: page || 1,
					limit: _this.limit,
				}, false, false, true).then(res => {
					if (res.code == 1) {
						let resList = res.data;
						let dataList = _this.list;
						if (isPage == true) {
							_this.list.data = dataList.data.concat(resList.data);
						} else {
							this.list = resList
							_this.list.data = resList.data;
						}
					}
				}).catch(err => {
					httpRequest.toast(err.msg);
				})
			},
			onReachBottom() {
				let _this = this;
				let list = _this.list;
				let page = _this.page;
				if (list.last_page <= page) {
					return false;
				}
				page++;
				_this.page = page;
				_this.init(true, page);
			},
		}
	}
</script>

<style lang="scss">
	.mainpdding2{
		padding: 0 30rpx 30rpx;
	}
	.topmsg{
		padding-bottom: 30rpx;
		border-bottom: 1rpx solid rgba(0, 0, 0, .1);
	}
	.strongtext{
		font-size: 28rpx;
		color: #333;
		font-weight: bold;
	}
	.nostrongtext{
		font-size: 28rpx;
		color: #333;
	}
	.allimage {
		flex-wrap: wrap;
	
	}
	
	.itemlable {
		margin-top: 30rpx;
		width: 25%;
	
	}
	
	.itemimage {
		position: relative;
	
		image {
			width: 100rpx;
			height: 100rpx;
			border-radius: 5rpx;
		}
	}
</style>
